<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>监管机构--政府遴选--详情</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Cache-Control" content="no-siteapp,no-transform,no-store, no-cache, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/weadmin.css">
    <script type="text/javascript" src="/lib/layui/layui.js" charset="utf-8"></script>
    <!--<script type="text/javascript" src="/templates/act/process-xl.js"></script>-->
    <style>
        .content {
            position: relative;
        }

        .btnBox {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 1000;
        }
    </style>
</head>
<body>
<div class="content" id="view">

</div>
<script src="/static/js/main.js"></script>
<script type="text/javascript">
    layui.use(['configureCom', 'configure', 'bluebird', 'baseTab', 'sessionFun', 'jquery', 'process'], function () {
        var configure = layui.configure;
        var configureCom = layui.configureCom;
        var baseTab = layui.baseTab;
        var sessionFun = layui.sessionFun;
        var process = layui.process;
        var $ = layui.jquery;
        var listData = sessionFun.get(configure.SESSION_PROJECT_WAIT_LIST_DATA);
        var tabData = {
            btns: [
                {name: '机构遴选', event: 'selection'},
                {name: '关闭', event: 'close'}
            ],
            tabList: [
                {
                    title: '项目管理',
                    url: configure.PRJ_DETAIL_ALL_READ_HTML
                }, {
                    title: '项目文件',
                    url: configure.PRJ_FILE_READ_HTML
                }, {
                    title: '勘察报告信息',
                    url: configure.PRJ_KC_REPORT_LIST_READ_HTML
                }, {
                    title: '设计报告信息',
                    url: configure.PRJ_SJ_REPORT_LIST_READ_HTML
                } ,{
                    title: '审查机构遴选',
                    url: configure.ORG_SELECTION_BODIES_READ_HTML
                }
            ]
        };
        baseTab.init(tabData, 0);
        form.on('submit', function (data) {
            var event = $(data.elem).attr('lay-event');
            switch (event) {
                case 'selection':
                    selection();
                    break;
                case 'close':
                    top.layer.closeAll();
                    break;
            }
            return false;
        });
        //机构遴选
        function selection() {
            top.layer.open({
                type: 2,
                title: '启动遴选',
                area: configureCom.Psize2,
                btnAlign: 'c',
                btn: ['启动遴选','取消'],
                content: configureCom.nocache(configure.ORG_START_SELECTION_HTML),
                yes: function (index, layero) {
                    var iframeWin = top.window.frames['layui-layer-iframe' + index]; //得到iframe页的窗口对
                    var data = iframeWin.getData().then(function (res) {
                        console.log(res);
                        configureCom.postDataAjax(configure.PRJ_SELECT_ADD_HTTP, res.result).then(function (res) {
                            process.next({
                               poId:listData.poId,
                               taskId: listData.taskId
                            });
                            top.layer.close(index);
                            top.layer.msg('启动成功！');
                        });
                    });
                }
            });

        }
    });


</script>
</body>
</html>